# Maintainer: Brett Cornwall <ainola@archlinux.org>
# Contributor: Alexander Courtis

pkgname=interception-dual-function-keys
pkgver=1.5.0
pkgrel=4
pkgdesc="Interception plugin for dual-function keys: Tap for one key, hold for another"
arch=('loong64' 'x86_64')
url="https://gitlab.com/interception/linux/plugins/dual-function-keys"
license=('MIT')
depends=('interception-tools')
source=("$pkgname-$pkgver.tar.gz::https://gitlab.com/interception/linux/plugins/dual-function-keys/-/archive/$pkgver/dual-function-keys-$pkgver.tar.gz")
sha256sums=('b0946b81a51655711eb1e8156a8086eef6e60002305ce2553a1e0a9fbdbdc4bf')

build() {
    cd "dual-function-keys-$pkgver"
    make VERSION="$pkgver"
}

package() {
    cd "dual-function-keys-$pkgver"
    make PREFIX=/usr DESTDIR="$pkgdir/" install
    install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
    install -Dm644 dual-function-keys.md -t "$pkgdir/usr/share/doc/$pkgname"
    install -Dm644 doc/examples.md -t "$pkgdir/usr/share/doc/$pkgname"
    install -Dm644 LICENSE.md -t "$pkgdir/usr/share/licenses/$pkgname"
}
